package cc.linker.steplink.crm.merchant.dao;


import cc.linker.steplink.crm.merchant.pojo.Express;
import cc.linker.steplink.crm.merchant.pojo.OrderGoods;
import cc.linker.steplink.crm.merchant.pojo.ShopOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ShopOrderMapper {

	List<OrderGoods> getOrderGoodsList(Map<String, Object> params);

	List<OrderGoods> getIntegralOrderGoodsList(Map<String, Object> params);

	List<ShopOrder> getOrderList(Map<String, Object> params);
	
	int remark(Map<String, Object> params);
	
	void delivery(Map<String, Object> params);
	void deliveryIntegral(Map<String, Object> params);

	Integer getNotDeliveryCount(Map<String, Object> map);
	Integer getNotDeliveryCountIntegral(Map<String, Object> map);

	void updateOrderStatus(Map<String, Object> map);
	void updateOrderStatusIntegral(Map<String, Object> map);

	Map<String, Object> getMsgInfo(Map<String, Object> map);
	Map<String, Object> getMsgInfoIntegral(Map<String, Object> map);

	List<Express> getExpress();
	
	ShopOrder getOrder(Map<String, Object> params);

	ShopOrder getIntegralOrder(Map<String, Object> params);

    int closeOrder(Map<String, Object> params);

	void updateStatusWhereAutoConfirm();

	void updateBalanceAndFreeze(Map<String, Object> map);

	void closeOrderWhereExpired(List list);

	List<String> listOrderWhereExpired();

	List<Map<String, Object>> listOrderByOrderId(List<String> list);

	List<Map<String, Object>> getOrderSnWhereAutoConfirm();

	Map getOrderInfoById(@Param(value = "orderId") Long orderId,@Param(value = "payMode") Integer payMode);

	Map getIntegralOrderInfoById(@Param(value = "orderId") Long orderId);

	List<Map<String, Object>> getMallsList(Map<String, Object> params);

	List<Map<String,Object>> getMallsOrderGoodsList(Map<String, Object> params);

    Map<String, Object> getMallsOrder(Map<String, Object> params);

	List<Map<String, Object>> getMallsOrderGoods(String purchaseSn);

	String getPayInfo(Map<String, Object> result);

	Map<String, Object> getMallsInfo(Map<String, Object> result);

	String getSalerNameByCustomerId(String customerId);

	String getMallsNameByCustomerId(String customerId);

	List<Map<String, Object>> getOrderExpress(Integer orderId);
	List<Map<String, Object>> getIntegralOrderExpress(Integer orderId);

	Integer getOrderIdByOrderSn(String orderSn);
	Integer getIntegralOrderIdByOrderSn(String orderSn);

	Map<String, Object> getRefundInfo(Integer recId);

	List<Map<String, Object>> getRefundInfoList(Integer recId);

	List<ShopOrder> getLossOrderList(Map<String, Object> params);

	int remarkIntegral(Map<String, Object> params);

	String getMallsCustomerIdByMallsName(@Param("mallsName") String mallsName);

	String getOrderIncome(@Param("orderSn") String orderSn,@Param("belongId")  String belongId);

	String getOrderExpend(@Param("orderSn") String orderSn,@Param("belongId")  String belongId);

	String getMerchantCustomerIdByMallsName(@Param("mallsName") String mallsName);

	String getSalerNameByOrgId(@Param("orgId") String orgId);

}
